-- GENERATED SPELL FOR [Mavoris Cloudsbreak] --


function spell0_3942(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(421,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3942', 2000, 1)
end

function spell1_3942(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(6535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3942', 18000, 1)
end

function Sorts_3942(pUnit, Event)
local choix_sorts_3942 = math.random(0, 1)
if choix_sorts_3942 == 0 then
pUnit:RegisterEvent('spell0_3942', 1, 1)
end
if choix_sorts_3942 == 1 then
pUnit:RegisterEvent('spell1_3942', 1, 1)
end
end

function mob3942_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3942', math.random(1500, 3000), 1)
end

function mob3942_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3942_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3942_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3942, 1, 'mob3942_Action')
RegisterUnitEvent(3942, 2, 'mob3942_Leave')
RegisterUnitEvent(3942, 3, 'mob3942_Kill')
RegisterUnitEvent(3942, 4, 'mob3942_Die')
